package com.example.xd.myijkplayer.utils

import android.content.Context

/**
 * @auther XuDan on 2020/9/16.
 */
fun dp2px(context: Context, dp: Float): Int {
    val scale = context.resources.displayMetrics.density
    return (dp * scale + 0.5f).toInt()
}